const { createProxyMiddleware } = require('http-proxy-middleware') 

module.exports = function(app){
	app.use(
		createProxyMiddleware('/ClassSchedule',{ 
			target:'http://localhost:8085', 
			changeOrigin:true,
			pathRewrite:{'^/ClassSchedule':''} 
		})
	)
    app.use(
        createProxyMiddleware('/PersonalList',{
            target:'http://localhost:8085', 
			changeOrigin:true,
			pathRewrite:{'^/PersonalList':''} 
        })
    )
	app.use(
        createProxyMiddleware('/Sidebar/PersonalAdd',{
            target:'http://localhost:8085', 
			changeOrigin:true,
			pathRewrite:{'^/Sidebar/PersonalAdd':''} 
        })
    )
	app.use(
        createProxyMiddleware('/Sidebar/PersonalFiles',{
            target:'http://localhost:8085', 
			changeOrigin:true,
			pathRewrite:{'^/Sidebar/PersonalFiles':''} 
        })
    )
	app.use(
        createProxyMiddleware('/Sidebar/PersonalEdit',{
            target:'http://localhost:8085', 
			changeOrigin:true,
			pathRewrite:{'^/Sidebar/PersonalEdit':''} 
        })
    )
	app.use(
        createProxyMiddleware('/ScoreList',{
            target:'http://localhost:8085', 
			changeOrigin:true,
			pathRewrite:{'^/ScoreList':''} 
        })
    )
	app.use(
        createProxyMiddleware('/Sidebar/ScoreQuery',{
            target:'http://localhost:8085', 
			changeOrigin:true,
			pathRewrite:{'^/Sidebar/ScoreQuery':''} 
        })
    )
}